//
//  RBInputBarView.h
//  RBDemoProj
//
//  Created by Lan on 2019/1/18.
//  Copyright © 2019年 SummerTea. All rights reserved.
/*
 输入框视图,使用场景:填充到self.view中
 1.添加,初始化之后是自动隐藏的
 RBInputBarView *view = [RBInputBarView view];
 [self.view addSubview:view];
 [view mas_makeConstraints:^(MASConstraintMaker *make) {
 make.edges.mas_equalTo(0);
 }];
 view.block = ^(NSString *text){
 //检验文字,提示...
 //手动调用dismiss
 };
 2.关掉IQKeyboardManager
 [[IQKeyboardManager sharedManager].disabledDistanceHandlingClasses addObject:[RBXxxxVC class]];
 [[IQKeyboardManager sharedManager].disabledToolbarClasses addObject:[RBXxxxVC class]];

 3.使用时
 [self.view show];
 
 ##tip:先把view加出来(eg:self.inputView.tag = 0),要不动画难看
 */

#import <UIKit/UIKit.h>

@interface RBInputBarView : UIView

/** 输入框最大高度,默认100 */
@property(nonatomic, assign) CGFloat maxHeight;
/** 文字最大长度 */
@property(nonatomic, assign) NSInteger maxLength;

/** 移到最上层,userInterfaceEnabled=YES,弹出toolBar, */
- (void)show;
/** userInterfaceEnabled=NO,隐藏toolBar, */
- (void)dismiss;

@property(nonatomic, copy) NSString *placeHolder;
/** 给输入框赋值内容,传@""置空 */
@property(nonatomic, copy) NSString *text;
/** 清空输入框文字 */
- (void)clearInputBox;

/** 确认按钮点击后调用block,只有点击空白处才自动调用dismiss */
@property(nonatomic, copy) void(^returnBlock)(NSString *text);

@end
